import { timeOptions, flagOptions } from '@/constants'
import dayjs from 'dayjs'

// 格式化，就诊时间
export const getIllnessTimeText = (illnessTime: number) => {
  return timeOptions.find(item => item.value === illnessTime)?.label
}

// 格式化，是否就诊过
export const getConsultFlagText = (consultFlag: number) => {
  return flagOptions.find(item => item.value === consultFlag)?.label
}

export const formatTime = (time: string) => {
  return dayjs(time).format('HH:mm')
}
